﻿/*******************************************************************************
 * Copyright © 2016-2020 北京网非科技有限公司 版权所有
 * Author: 北京网非科技有限公司
 * Description: 网非快速开发平台NET
 * Website：http://www.wfdot.com
*********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CubicFWNet.Common;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace CubicFWNet.Data.SystemSecurity.Model
{
    [Table("OperatorLog")]
    public class OperatorLog
    {
        public OperatorLog()
        {
            this.Id = Guid.NewGuid();
            Time = DateTime.Now;
        }

        [Key]
        public Guid Id { get; set; }

        [Required]
        /// <summary>
        /// 操作人ID
        /// </summary>
        public Guid UserId { get; set; }

        [Required]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar")]
        /// <summary>
        /// 操作人姓名
        /// </summary>
        public string Name { get; set; }

        [MaxLength(1024)]
        [Column(TypeName = "nvarchar")]
        /// <summary>
        /// 操作描述
        /// </summary>
        public string Description { get; set; }

        [MaxLength(128)]
        [Column(TypeName = "varchar")]
        /// <summary>
        /// 操作 URL
        /// </summary>
        public string ModuleUrl { get; set; }

        [MaxLength(16)]
        [Column(TypeName = "varchar")]
        /// <summary>
        /// 操作状态   success  error  warning
        /// </summary>
        public string Status { get; set; }

        private int _EmOpeartor = (Int16)EmOpeartor.none;
        /// <summary>
        /// 操作类型
        /// </summary>
        public EmOpeartor EmOpeartor { get { return (EmOpeartor)_EmOpeartor; } set { _EmOpeartor = (Int16)value; } }

        [Required]
        /// <summary>
        /// 操作时间
        /// </summary>
        public DateTime Time { get; set; }

    }

}
